<template>
  <div id="app">
    <router-view />
  </div>
</template>

<script>
import {sysStyleGet} from "@/api/form/systemConfig";
import {changeStyle} from "@/utils";
import {getToken} from "./utils/auth";

export default  {
  name:  'App',
  mounted() {
    if (!getToken()) return
    sysStyleGet().then(res => {
      const { code, data } = res
      if (code === 200) {
        const style = data.rows.find(item => item.isDefault === 'Y')
        changeStyle(style.dictValue)
      }
    })
  },
  // 配置网页标题
  metaInfo() {
    return {
      title: window.serverAPI.name
    }
  }
}
</script>

<style>
:root {
  --nav_bg_color: #ffffff;
  --theme_bg_color: #F2F3F5;
  --active_font_color: #000000;
  --breadcrumb_color: #646A73;
  --breadcrumb_color_active: #111111;
}
</style>
